package com.ktgj.customer.mapper;

import java.util.List;
import com.ktgj.customer.domain.Rightdetail;
import org.apache.ibatis.annotations.Param;

/**
 * 权益Mapper接口
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
public interface RightdetailMapper 
{
    /**
     * 查询权益
     * 
     * @param rightdetailId 权益ID
     * @return 权益
     */
    public Rightdetail selectRightdetailById(Long rightdetailId);

    /**
     * 查询权益列表
     * 
     * @param rightdetail 权益
     * @return 权益集合
     */
    public List<Rightdetail> selectRightdetailList(Rightdetail rightdetail);

    /**
     * 新增权益
     * 
     * @param rightdetail 权益
     * @return 结果
     */
    public int insertRightdetail(Rightdetail rightdetail);

    /**
     * 修改权益
     * 
     * @param rightdetail 权益
     * @return 结果
     */
    public int updateRightdetail(Rightdetail rightdetail);

    /**
     * 删除权益
     * 
     * @param rightdetailId 权益ID
     * @return 结果
     */
    public int deleteRightdetailById(Long rightdetailId);

    /**
     * 批量删除权益
     * 
     * @param rightdetailIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteRightdetailByIds(Long[] rightdetailIds);

    /**
     * 根据卡id查询卡有那些权益
     *
     * @param cardId
     * @return
     */
    public List<Rightdetail> selectRightdetailByCardId(@Param("cardId") Long cardId);

    /**
     * 根据卡id查询权益包有那些权益
     *
     * @param cardId
     * @return
     */
    public List<Rightdetail> selectrightdetailbyPackId(@Param("cardId")Long cardId);

    /**
     * 会员已解锁权益
     * */
    public Rightdetail selectrightdetailbyCustomerId(@Param("rightdetailId") Long rightdetailId,
                                                     @Param("customerId")Long customerId);
}
